package study07;
import java.awt.Point;

public class Circle {
    private double r;
    private Point point;

    public Circle(double radius, Point center) {
        this.r = radius;
        this.point = center;
    }

    public double getArea() {
        return Math.PI * r * r;
    }

    public double getPerimeter() {
        return 2 * Math.PI * r;
    }

    public static void main(String[] args) {
        // 创建一个新的圆对象
        Circle circle = new Circle(5, new Point(0, 0));

        // 输出圆的面积和周长
        System.out.println("The area of the circle is " + circle.getArea());
        System.out.println("The perimeter of the circle is " + circle.getPerimeter());
    }
}
